package cc.rengu.igas.bomp.common.enums;

import cc.rengu.oltp.utility.util.StringUtil;

/**
 * 微信优惠费率活动报名申请单结果
 */
public enum WechatActivityStatusEnum {

    APPLICATION_STATE_AUDITING("APPLICATION_STATE_AUDITING", "审核中，如果查到申请单是审核中的状态，请耐心等待1~2个工作日，微信支付将会完成审核", "I"),
    APPLICATION_STATE_PASSED("APPLICATION_STATE_PASSED", "审核通过，表示活动报名成功", "Y"),
    APPLICATION_STATE_REJECTED("APPLICATION_STATE_REJECTED", "审核驳回，如果查到申请单是审核驳回状态，请按照驳回原因修改申请资料，重新提交申请", "R"),

    ;

    public static String getEpayStatusByWechatStatus(String wechatStatus) {
        if (StringUtil.isEmptyOrNull(wechatStatus)) {
            return null;
        }
        for (WechatActivityStatusEnum wechatActivityStatusEnum : values()) {
            if (wechatStatus.equals(wechatActivityStatusEnum.getWechatStatus())) {
                return wechatActivityStatusEnum.getEpayStatus();
            }
        }

        return null;
    }

    private String wechatStatus;
    private String statusDesc;
    private String epayStatus;

    public String getWechatStatus() {
        return wechatStatus;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public String getEpayStatus() {
        return epayStatus;
    }

    WechatActivityStatusEnum(String wechatStatus, String statusDesc, String epayStatus) {
        this.wechatStatus = wechatStatus;
        this.statusDesc = statusDesc;
        this.epayStatus = epayStatus;
    }
}
